#include "StdAfx.h"
#include "File.h"

#include "FileMappingImpl.h"

	File::File()
	{
		m_pImpl = new FileMappingImpl;
	}

	File::~File()
	{
		delete m_pImpl;
	}

	bool File::Open( std::string const &strFileName, File::OpenMode eMode )
	{
		return m_pImpl->Open(strFileName, eMode);
	}

	bool File::Create( std::string const &strFileName, File::OpenMode eMode )
	{
		return m_pImpl->Create(strFileName, eMode);
	}

	bool File::IsOpen()
	{
		return m_pImpl->IsOpen();
	}

	void File::Close()
	{
		m_pImpl->Close();
	}

	void File::Read( void* lpData, int n )
	{
		m_pImpl->Read(lpData, n);
	}

	void File::Write( void* lpData, int n )
	{
		m_pImpl->Write(lpData, n);
	}

	void File::Append( void* lpData, int n )
	{
		m_pImpl->Append(lpData, n);
	}

	bool File::Seek( std::uint64_t nOffset, File::Pos ePos )
	{
		return m_pImpl->Seek(nOffset, ePos);
	}

	bool File::IsEmpty()
	{
		return m_pImpl->IsEmpty();
	}

	std::uint16_t File::Size()
	{
		return m_pImpl->Size();
	}



